package com.han.mediator;

/**
 * @ClassName Client
 * @Description 描述该类的功能
 * @Author duoduo Han
 * @Date 2024/6/17 15:56
 */
public class Client {
    public static void main(String[] args) {
        //创建中介者对象
        MediatorStructure mediator = new MediatorStructure();
        //创建租房者对象
        Tenant tenant = new Tenant("打工人A", mediator);
        //创建房主对象
        HouseOwner houseOwner = new HouseOwner("大地主", mediator);

        //中介者要知道具体的房主和租房者
        mediator.setHouseOwner(houseOwner);
        mediator.setTenant(tenant);

        tenant.constact("我要租房子");
        houseOwner.constact("我这里有房子");
    }
}
